import React from 'react'
import { Redirect } from 'react-router'

export default ({ path, ...others }) => {
  if (path === decodeURI(window.location.pathname)) return <Redirect {...others} path={path} />
  return null
}
